import { NodeSize } from '../config'

export default function writeToLog(flow) {
  flow.register('WriteToLog', ({ PolygonNode, PolygonNodeModel, h }) => {
    class Node extends PolygonNode {
      getIconShape() {
        return h(
          'svg',
          {
            width: NodeSize,
            height: NodeSize,
            viewBox: '0 0 1024 1024'
          },
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M134.92419 287.792762l155.794286-0.048762V133.485714h-46.34819v75.190857L116.97981 81.286095 84.21181 114.054095 211.626667 241.444571H134.92419z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M520.94781 531.407238c-15.213714 0-20.163048 5.778286-20.163048 17.846857v49.932191c0 12.092952 4.949333 17.846857 20.163048 17.846857s20.163048-5.753905 20.163047-17.846857v-49.932191c0.024381-12.068571-4.949333-17.846857-20.163047-17.846857zM573.464381 663.064381c-15.213714 0-20.163048 5.778286-20.163048 17.871238v49.90781c0 12.092952 4.949333 17.846857 20.163048 17.846857 15.213714 0 20.163048-5.753905 20.163048-17.846857v-49.90781c-0.024381-12.092952-4.973714-17.871238-20.163048-17.871238zM520.94781 353.694476c15.213714 0 20.163048-5.778286 20.163047-17.846857v-49.93219c0-12.068571-4.949333-17.846857-20.163047-17.846858s-20.163048 5.778286-20.163048 17.846858v49.93219c0 12.04419 4.949333 17.846857 20.163048 17.846857zM374.930286 353.694476c15.213714 0 20.163048-5.778286 20.163047-17.846857v-49.93219c0-1.682286-0.365714-2.974476-0.560762-4.412953l-39.765333 39.765334v14.579809c-0.024381 12.04419 4.949333 17.846857 20.163048 17.846857zM374.930286 617.033143c15.213714 0 20.163048-5.753905 20.163047-17.846857v-49.932191c0-12.068571-4.949333-17.846857-20.163047-17.846857s-20.187429 5.778286-20.187429 17.846857v49.932191c0 12.092952 4.973714 17.846857 20.187429 17.846857zM427.422476 485.376c15.213714 0 20.163048-5.802667 20.163048-17.871238v-49.932191c0-12.068571-4.949333-17.822476-20.163048-17.822476s-20.187429 5.753905-20.187428 17.822476v49.932191c0 12.068571 4.973714 17.871238 20.187428 17.871238zM573.464381 485.376c15.213714 0 20.163048-5.802667 20.163048-17.871238v-49.932191c0-12.068571-4.949333-17.822476-20.163048-17.822476-15.213714 0-20.163048 5.753905-20.163048 17.822476v49.932191c0 12.068571 4.949333 17.871238 20.163048 17.871238z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M732.330667 809.984l-1.414096-491.324952h-103.789714V214.844952h-165.985524l-55.247238 55.247238c2.048 4.144762 3.072 8.94781 3.072 14.287239v52.931047c0 16.530286-8.43581 28.598857-34.035809 28.598857-25.648762 0-34.06019-12.068571-34.060191-28.598857v-2.169905l-39.911619 39.911619v434.93181h431.372191z m-270.848-77.628952c0 16.554667-8.43581 28.598857-34.060191 28.598857-25.624381 0-34.06019-12.04419-34.06019-28.598857v-52.906667c0-16.530286 8.43581-28.623238 34.06019-28.623238 25.624381 0 34.06019 12.092952 34.060191 28.623238v52.906667z m-17.65181-199.314286c-2.681905 1.389714-7.460571 3.413333-8.411428 3.413333-1.340952 0-2.072381-0.414476-2.218667-1.243428a162.718476 162.718476 0 0 1-0.292572-1.487238 24.966095 24.966095 0 0 1-0.682666-4.85181c0-1.462857 0.877714-2.389333 3.267047-3.437714 4.510476-2.023619 13.872762-6.290286 19.870477-6.290286 3.437714 0 3.949714 2.608762 3.949714 4.217905v101.473524c0 3.218286-1.048381 4.437333-3.949714 4.437333h-4.388572c-4.315429 0-5.583238-0.585143-5.583238-4.437333v-92.574477l-1.560381 0.780191z m163.693714 199.314286c0 16.554667-8.43581 28.598857-34.06019 28.598857s-34.06019-12.04419-34.060191-28.598857v-52.906667c0-16.530286 8.43581-28.623238 34.060191-28.623238s34.06019 12.092952 34.06019 28.623238v52.906667z m-86.576761-103.082667c-25.624381 0-34.06019-12.068571-34.060191-28.598857v-52.906667c0-16.554667 8.43581-28.623238 34.060191-28.623238s34.06019 12.068571 34.06019 28.623238v52.906667c0 16.530286-8.411429 28.598857-34.06019 28.598857z m68.924952-96.231619c-2.706286 1.389714-7.43619 3.413333-8.43581 3.413333-1.340952 0-2.072381-0.414476-2.218666-1.243428l-0.292572-1.487238c-0.341333-1.633524-0.707048-3.34019-0.707047-4.85181 0-1.462857 0.902095-2.389333 3.267047-3.437714 4.486095-2.023619 13.848381-6.290286 19.846096-6.290286 3.437714 0 3.949714 2.608762 3.949714 4.217905v101.473524c0 3.218286-1.048381 4.437333-3.949714 4.437333h-4.364191c-4.33981 0-5.583238-0.585143-5.583238-4.437333v-92.574477l-1.511619 0.780191z m-8.362667-270.921143c4.486095-2.048 13.848381-6.290286 19.846095-6.290286 3.437714 0 3.949714 2.608762 3.949715 4.169143v101.473524c0 3.267048-1.048381 4.461714-3.949715 4.461714h-4.36419c-4.33981 0-5.583238-0.560762-5.583238-4.461714V268.921905l-1.536 0.78019c-2.706286 1.365333-7.43619 3.413333-8.43581 3.413334-1.340952 0-2.072381-0.438857-2.218666-1.26781l-0.292572-1.462857a24.795429 24.795429 0 0 1-0.707047-4.85181c0.024381-1.462857 0.926476-2.364952 3.291428-3.413333z m26.014476 153.941333v52.931048c0 16.530286-8.43581 28.598857-34.06019 28.598857s-34.06019-12.068571-34.060191-28.598857v-52.931048c0-16.530286 8.43581-28.574476 34.060191-28.574476s34.06019 12.04419 34.06019 28.574476z m-120.636952-131.657142c0-16.530286 8.43581-28.574476 34.060191-28.574477s34.06019 12.04419 34.06019 28.574477v52.931047c0 16.530286-8.43581 28.598857-34.06019 28.598857s-34.06019-12.068571-34.060191-28.598857v-52.931047z m1.072762 109.372952c4.510476-2.048 13.872762-6.290286 19.870476-6.290286 3.437714 0 3.949714 2.608762 3.949714 4.193524v101.473524c0 3.242667-1.072762 4.437333-3.949714 4.437333h-4.388571c-4.315429 0-5.583238-0.560762-5.583238-4.437333V400.579048l-1.536 0.78019c-2.706286 1.389714-7.460571 3.413333-8.43581 3.413333-1.340952 0-2.072381-0.438857-2.194286-1.267809l-0.292571-1.462857a24.990476 24.990476 0 0 1-0.682667-4.827429c0-1.487238 0.877714-2.389333 3.242667-3.437714z m0 263.338667c4.510476-2.023619 13.872762-6.290286 19.870476-6.290286 3.437714 0 3.949714 2.608762 3.949714 4.217905v101.473523c0 3.218286-1.072762 4.437333-3.949714 4.437334h-4.388571c-4.315429 0-5.583238-0.560762-5.583238-4.437334v-92.550095l-1.536 0.75581c-2.706286 1.365333-7.460571 3.388952-8.43581 3.388952-1.340952 0-2.072381-0.390095-2.194286-1.243428l-0.292571-1.487239a24.966095 24.966095 0 0 1-0.682667-4.851809c0-1.438476 0.877714-2.364952 3.242667-3.413333z m-52.492191-394.99581c4.510476-2.048 13.872762-6.290286 19.870477-6.290286 3.437714 0 3.949714 2.608762 3.949714 4.169143v101.473524c0 3.267048-1.048381 4.461714-3.949714 4.461714h-4.388572c-4.315429 0-5.583238-0.560762-5.583238-4.461714V268.921905l-1.536 0.78019c-2.681905 1.365333-7.460571 3.413333-8.411428 3.413334-1.340952 0-2.072381-0.438857-2.218667-1.26781l-0.292572-1.462857a24.722286 24.722286 0 0 1-0.682666-4.85181c-0.024381-1.462857 0.853333-2.364952 3.242666-3.413333z m-42.105904 153.941333c0-16.530286 8.43581-28.574476 34.06019-28.574476 25.624381 0 34.06019 12.04419 34.060191 28.574476v52.931048c0 16.530286-8.43581 28.598857-34.060191 28.598857-25.624381 0-34.06019-12.068571-34.06019-28.598857v-52.931048z m15.603809 131.705905v52.906667c0 16.530286-8.43581 28.598857-34.035809 28.598857-25.648762 0-34.06019-12.068571-34.060191-28.598857v-52.906667c0-16.554667 8.43581-28.623238 34.060191-28.623238 25.6 0.024381 34.03581 12.092952 34.035809 28.623238z m-67.047619-153.990095c4.510476-2.048 13.848381-6.290286 19.870476-6.290286 3.437714 0 3.949714 2.608762 3.949715 4.193524v101.473524c0 3.242667-1.072762 4.437333-3.949715 4.437333h-4.388571c-4.315429 0-5.583238-0.560762-5.583238-4.437333V400.579048l-1.560381 0.78019c-2.706286 1.389714-7.43619 3.413333-8.411429 3.413333-1.340952 0-2.072381-0.438857-2.218666-1.267809l-0.292572-1.462857a24.990476 24.990476 0 0 1-0.682666-4.827429c0-1.487238 0.902095-2.389333 3.267047-3.437714z m0 263.338667c4.510476-2.023619 13.848381-6.290286 19.870476-6.290286 3.437714 0 3.949714 2.608762 3.949715 4.217905v101.473523c0 3.218286-1.072762 4.437333-3.949715 4.437334h-4.388571c-4.315429 0-5.583238-0.560762-5.583238-4.437334v-92.550095l-1.560381 0.75581c-2.706286 1.365333-7.43619 3.388952-8.411429 3.388952-1.340952 0-2.072381-0.390095-2.218666-1.243428l-0.292572-1.487239a24.966095 24.966095 0 0 1-0.682666-4.851809c0-1.438476 0.902095-2.364952 3.267047-3.413333z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M427.422476 663.064381c-15.213714 0-20.187429 5.778286-20.187428 17.871238v49.90781c0 12.092952 4.973714 17.846857 20.187428 17.846857s20.163048-5.753905 20.163048-17.846857v-49.90781c0-12.092952-4.949333-17.871238-20.163048-17.871238z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M772.36419 318.902857l-41.667047-41.667047h-62.122667V215.113143l-41.691428-41.691429h-124.294096l-41.447619 41.423238h165.985524v103.814096h103.789714l1.414096 491.324952H300.934095V375.05219l-41.447619 41.472v434.907429h514.413714z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M374.930286 365.909333c25.624381 0 34.03581-12.068571 34.035809-28.598857v-52.931047c0-5.339429-1.024-10.142476-3.072-14.287239l-11.385905 11.385905c0.219429 1.438476 0.560762 2.730667 0.560762 4.412953v49.93219c0 12.068571-4.949333 17.846857-20.163047 17.846857s-20.187429-5.778286-20.187429-17.846857v-14.579809l-13.897143 13.897142v2.169905c0.024381 16.530286 8.46019 28.598857 34.108953 28.598857z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M374.930286 365.909333c25.624381 0 34.03581-12.068571 34.035809-28.598857v-52.931047c0-5.339429-1.024-10.142476-3.072-14.287239l-11.385905 11.385905c0.219429 1.438476 0.560762 2.730667 0.560762 4.412953v49.93219c0 12.068571-4.949333 17.846857-20.163047 17.846857s-20.187429-5.778286-20.187429-17.846857v-14.579809l-13.897143 13.897142v2.169905c0.024381 16.530286 8.46019 28.598857 34.108953 28.598857z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M433.200762 271.847619c0.121905 0.828952 0.877714 1.26781 2.218667 1.26781 0.975238 0 5.729524-2.048 8.411428-3.413334l1.536-0.78019v92.550095c0 3.876571 1.26781 4.461714 5.583238 4.461714h4.388572c2.901333 0 3.949714-1.194667 3.949714-4.461714v-101.473524c0-1.560381-0.512-4.169143-3.949714-4.169143-5.997714 0-15.36 4.242286-19.870477 6.290286-2.389333 1.048381-3.267048 1.950476-3.267047 3.413333 0 1.536 0.341333 3.242667 0.682667 4.85181l0.316952 1.462857z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M433.200762 271.847619c0.121905 0.828952 0.877714 1.26781 2.218667 1.26781 0.975238 0 5.729524-2.048 8.411428-3.413334l1.536-0.78019v92.550095c0 3.876571 1.26781 4.461714 5.583238 4.461714h4.388572c2.901333 0 3.949714-1.194667 3.949714-4.461714v-101.473524c0-1.560381-0.512-4.169143-3.949714-4.169143-5.997714 0-15.36 4.242286-19.870477 6.290286-2.389333 1.048381-3.267048 1.950476-3.267047 3.413333 0 1.536 0.341333 3.242667 0.682667 4.85181l0.316952 1.462857z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M520.94781 365.909333c25.624381 0 34.06019-12.068571 34.06019-28.598857v-52.931047c0-16.530286-8.43581-28.574476-34.06019-28.574477s-34.06019 12.04419-34.060191 28.574477v52.931047c0 16.530286 8.43581 28.598857 34.060191 28.598857z m-20.163048-80.018285c0-12.068571 4.949333-17.846857 20.163048-17.846858s20.163048 5.778286 20.163047 17.846858v49.93219c0 12.068571-4.949333 17.846857-20.163047 17.846857s-20.163048-5.778286-20.163048-17.846857v-49.93219z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M520.94781 365.909333c25.624381 0 34.06019-12.068571 34.06019-28.598857v-52.931047c0-16.530286-8.43581-28.574476-34.06019-28.574477s-34.06019 12.04419-34.060191 28.574477v52.931047c0 16.530286 8.43581 28.598857 34.060191 28.598857z m-20.163048-80.018285c0-12.068571 4.949333-17.846857 20.163048-17.846858s20.163048 5.778286 20.163047 17.846858v49.93219c0 12.068571-4.949333 17.846857-20.163047 17.846857s-20.163048-5.778286-20.163048-17.846857v-49.93219z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M579.242667 271.847619c0.121905 0.828952 0.877714 1.26781 2.218666 1.26781 0.999619 0 5.705143-2.048 8.43581-3.413334l1.536-0.78019v92.550095c0 3.876571 1.243429 4.461714 5.583238 4.461714h4.36419c2.901333 0 3.949714-1.194667 3.949715-4.461714v-101.473524c0-1.560381-0.512-4.169143-3.949715-4.169143-5.997714 0-15.36 4.242286-19.846095 6.290286-2.389333 1.048381-3.267048 1.950476-3.267047 3.413333 0 1.536 0.365714 3.242667 0.707047 4.85181l0.268191 1.462857z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M579.242667 271.847619c0.121905 0.828952 0.877714 1.26781 2.218666 1.26781 0.999619 0 5.705143-2.048 8.43581-3.413334l1.536-0.78019v92.550095c0 3.876571 1.243429 4.461714 5.583238 4.461714h4.36419c2.901333 0 3.949714-1.194667 3.949715-4.461714v-101.473524c0-1.560381-0.512-4.169143-3.949715-4.169143-5.997714 0-15.36 4.242286-19.846095 6.290286-2.389333 1.048381-3.267048 1.950476-3.267047 3.413333 0 1.536 0.365714 3.242667 0.707047 4.85181l0.268191 1.462857z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M340.845714 547.766857v52.906667c0 16.530286 8.43581 28.598857 34.060191 28.598857 25.624381 0 34.03581-12.068571 34.035809-28.598857v-52.906667c0-16.554667-8.43581-28.623238-34.035809-28.623238-25.624381 0.024381-34.06019 12.092952-34.060191 28.623238z m13.897143 1.487238c0-12.068571 4.973714-17.846857 20.187429-17.846857s20.163048 5.778286 20.163047 17.846857v49.932191c0 12.092952-4.949333 17.846857-20.163047 17.846857s-20.187429-5.753905-20.187429-17.846857v-49.932191z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M340.845714 547.766857v52.906667c0 16.530286 8.43581 28.598857 34.060191 28.598857 25.624381 0 34.03581-12.068571 34.035809-28.598857v-52.906667c0-16.554667-8.43581-28.623238-34.035809-28.623238-25.624381 0.024381-34.06019 12.092952-34.060191 28.623238z m13.897143 1.487238c0-12.068571 4.973714-17.846857 20.187429-17.846857s20.163048 5.778286 20.163047 17.846857v49.932191c0 12.092952-4.949333 17.846857-20.163047 17.846857s-20.187429-5.753905-20.187429-17.846857v-49.932191z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M450.950095 629.272381h4.388572c2.901333 0 3.949714-1.219048 3.949714-4.437333v-101.473524c0-1.584762-0.512-4.217905-3.949714-4.217905-5.997714 0-15.36 4.266667-19.870477 6.290286-2.389333 1.048381-3.267048 1.974857-3.267047 3.437714 0 1.536 0.341333 3.218286 0.682667 4.85181l0.292571 1.487238c0.121905 0.828952 0.877714 1.243429 2.218667 1.243428 0.975238 0 5.729524-2.023619 8.411428-3.413333l1.536-0.75581v92.574477c0.024381 3.82781 1.29219 4.412952 5.607619 4.412952z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M450.950095 629.272381h4.388572c2.901333 0 3.949714-1.219048 3.949714-4.437333v-101.473524c0-1.584762-0.512-4.217905-3.949714-4.217905-5.997714 0-15.36 4.266667-19.870477 6.290286-2.389333 1.048381-3.267048 1.974857-3.267047 3.437714 0 1.536 0.341333 3.218286 0.682667 4.85181l0.292571 1.487238c0.121905 0.828952 0.877714 1.243429 2.218667 1.243428 0.975238 0 5.729524-2.023619 8.411428-3.413333l1.536-0.75581v92.574477c0.024381 3.82781 1.29219 4.412952 5.607619 4.412952z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M555.008 600.673524v-52.906667c0-16.554667-8.43581-28.623238-34.06019-28.623238s-34.06019 12.068571-34.060191 28.623238v52.906667c0 16.530286 8.43581 28.598857 34.060191 28.598857s34.06019-12.068571 34.06019-28.598857z m-13.872762-1.487238c0 12.092952-4.949333 17.846857-20.163048 17.846857s-20.163048-5.753905-20.163047-17.846857v-49.932191c0-12.068571 4.949333-17.846857 20.163047-17.846857s20.163048 5.778286 20.163048 17.846857v49.932191z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M555.008 600.673524v-52.906667c0-16.554667-8.43581-28.623238-34.06019-28.623238s-34.06019 12.068571-34.060191 28.623238v52.906667c0 16.530286 8.43581 28.598857 34.060191 28.598857s34.06019-12.068571 34.06019-28.598857z m-13.872762-1.487238c0 12.092952-4.949333 17.846857-20.163048 17.846857s-20.163048-5.753905-20.163047-17.846857v-49.932191c0-12.068571 4.949333-17.846857 20.163047-17.846857s20.163048 5.778286 20.163048 17.846857v49.932191z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M597.016381 629.272381h4.36419c2.901333 0 3.949714-1.219048 3.949715-4.437333v-101.473524c0-1.584762-0.512-4.217905-3.949715-4.217905-5.997714 0-15.36 4.266667-19.846095 6.290286-2.389333 1.048381-3.267048 1.974857-3.267047 3.437714 0 1.536 0.365714 3.218286 0.707047 4.85181l0.292572 1.487238c0.121905 0.828952 0.877714 1.243429 2.218666 1.243428 0.999619 0 5.705143-2.023619 8.43581-3.413333l1.536-0.75581v92.574477c-0.024381 3.82781 1.219048 4.412952 5.558857 4.412952z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M597.016381 629.272381h4.36419c2.901333 0 3.949714-1.219048 3.949715-4.437333v-101.473524c0-1.584762-0.512-4.217905-3.949715-4.217905-5.997714 0-15.36 4.266667-19.846095 6.290286-2.389333 1.048381-3.267048 1.974857-3.267047 3.437714 0 1.536 0.365714 3.218286 0.707047 4.85181l0.292572 1.487238c0.121905 0.828952 0.877714 1.243429 2.218666 1.243428 0.999619 0 5.705143-2.023619 8.43581-3.413333l1.536-0.75581v92.574477c-0.024381 3.82781 1.219048 4.412952 5.558857 4.412952z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M339.651048 403.504762c0.121905 0.828952 0.877714 1.26781 2.218666 1.267809 0.975238 0 5.705143-2.023619 8.411429-3.413333l1.560381-0.78019v92.574476c0 3.85219 1.243429 4.437333 5.583238 4.437333h4.388571c2.876952 0 3.949714-1.194667 3.949715-4.437333v-101.473524c0-1.584762-0.512-4.193524-3.949715-4.193524-6.022095 0-15.384381 4.242286-19.870476 6.290286-2.389333 1.048381-3.267048 1.950476-3.267047 3.437714 0 1.511619 0.365714 3.193905 0.682666 4.827429l0.292572 1.462857z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M339.651048 403.504762c0.121905 0.828952 0.877714 1.26781 2.218666 1.267809 0.975238 0 5.705143-2.023619 8.411429-3.413333l1.560381-0.78019v92.574476c0 3.85219 1.243429 4.437333 5.583238 4.437333h4.388571c2.876952 0 3.949714-1.194667 3.949715-4.437333v-101.473524c0-1.584762-0.512-4.193524-3.949715-4.193524-6.022095 0-15.384381 4.242286-19.870476 6.290286-2.389333 1.048381-3.267048 1.950476-3.267047 3.437714 0 1.511619 0.365714 3.193905 0.682666 4.827429l0.292572 1.462857z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M427.422476 497.590857c25.624381 0 34.06019-12.068571 34.060191-28.598857v-52.931048c0-16.530286-8.43581-28.574476-34.060191-28.574476-25.624381 0-34.06019 12.04419-34.06019 28.574476v52.931048c0 16.530286 8.411429 28.598857 34.06019 28.598857z m-20.187428-80.018286c0-12.068571 4.973714-17.822476 20.187428-17.822476s20.163048 5.753905 20.163048 17.822476v49.932191c0 12.068571-4.949333 17.871238-20.163048 17.871238s-20.187429-5.802667-20.187428-17.871238v-49.932191z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M427.422476 497.590857c25.624381 0 34.06019-12.068571 34.060191-28.598857v-52.931048c0-16.530286-8.43581-28.574476-34.060191-28.574476-25.624381 0-34.06019 12.04419-34.06019 28.574476v52.931048c0 16.530286 8.411429 28.598857 34.06019 28.598857z m-20.187428-80.018286c0-12.068571 4.973714-17.822476 20.187428-17.822476s20.163048 5.753905 20.163048 17.822476v49.932191c0 12.068571-4.949333 17.871238-20.163048 17.871238s-20.187429-5.802667-20.187428-17.871238v-49.932191z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M485.692952 403.504762c0.121905 0.828952 0.877714 1.26781 2.194286 1.267809 0.975238 0 5.729524-2.023619 8.43581-3.413333l1.536-0.78019v92.574476c0 3.85219 1.26781 4.437333 5.583238 4.437333h4.388571c2.876952 0 3.949714-1.194667 3.949714-4.437333v-101.473524c0-1.584762-0.512-4.193524-3.949714-4.193524-5.997714 0-15.36 4.242286-19.870476 6.290286-2.389333 1.048381-3.267048 1.950476-3.267048 3.437714 0 1.511619 0.341333 3.193905 0.682667 4.827429l0.316952 1.462857z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M485.692952 403.504762c0.121905 0.828952 0.877714 1.26781 2.194286 1.267809 0.975238 0 5.729524-2.023619 8.43581-3.413333l1.536-0.78019v92.574476c0 3.85219 1.26781 4.437333 5.583238 4.437333h4.388571c2.876952 0 3.949714-1.194667 3.949714-4.437333v-101.473524c0-1.584762-0.512-4.193524-3.949714-4.193524-5.997714 0-15.36 4.242286-19.870476 6.290286-2.389333 1.048381-3.267048 1.950476-3.267048 3.437714 0 1.511619 0.341333 3.193905 0.682667 4.827429l0.316952 1.462857z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M539.37981 416.060952v52.931048c0 16.530286 8.43581 28.598857 34.06019 28.598857s34.06019-12.068571 34.06019-28.598857v-52.931048c0-16.530286-8.43581-28.574476-34.06019-28.574476s-34.06019 12.04419-34.06019 28.574476z m13.921523 1.511619c0-12.068571 4.949333-17.822476 20.163048-17.822476 15.213714 0 20.163048 5.753905 20.163048 17.822476v49.932191c0 12.068571-4.949333 17.871238-20.163048 17.871238-15.213714 0-20.163048-5.802667-20.163048-17.871238v-49.932191z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M539.37981 416.060952v52.931048c0 16.530286 8.43581 28.598857 34.06019 28.598857s34.06019-12.068571 34.06019-28.598857v-52.931048c0-16.530286-8.43581-28.574476-34.06019-28.574476s-34.06019 12.04419-34.06019 28.574476z m13.921523 1.511619c0-12.068571 4.949333-17.822476 20.163048-17.822476 15.213714 0 20.163048 5.753905 20.163048 17.822476v49.932191c0 12.068571-4.949333 17.871238-20.163048 17.871238-15.213714 0-20.163048-5.802667-20.163048-17.871238v-49.932191z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M339.651048 666.86781c0.121905 0.853333 0.877714 1.243429 2.218666 1.243428 0.975238 0 5.705143-2.023619 8.411429-3.388952l1.560381-0.75581v92.550095c0 3.85219 1.243429 4.437333 5.583238 4.437334h4.388571c2.876952 0 3.949714-1.219048 3.949715-4.437334v-101.473523c0-1.584762-0.512-4.217905-3.949715-4.217905-6.022095 0-15.384381 4.266667-19.870476 6.290286-2.389333 1.048381-3.267048 1.974857-3.267047 3.437714 0 1.536 0.365714 3.218286 0.682666 4.851809l0.292572 1.462858z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M339.651048 666.86781c0.121905 0.853333 0.877714 1.243429 2.218666 1.243428 0.975238 0 5.705143-2.023619 8.411429-3.388952l1.560381-0.75581v92.550095c0 3.85219 1.243429 4.437333 5.583238 4.437334h4.388571c2.876952 0 3.949714-1.219048 3.949715-4.437334v-101.473523c0-1.584762-0.512-4.217905-3.949715-4.217905-6.022095 0-15.384381 4.266667-19.870476 6.290286-2.389333 1.048381-3.267048 1.974857-3.267047 3.437714 0 1.536 0.365714 3.218286 0.682666 4.851809l0.292572 1.462858z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M427.422476 650.825143c-25.624381 0-34.06019 12.092952-34.06019 28.623238v52.906667c0 16.554667 8.43581 28.598857 34.06019 28.598857 25.624381 0 34.06019-12.04419 34.060191-28.598857v-52.906667c0-16.530286-8.46019-28.623238-34.060191-28.623238z m20.163048 80.018286c0 12.092952-4.949333 17.846857-20.163048 17.846857s-20.187429-5.753905-20.187428-17.846857v-49.90781c0-12.092952 4.973714-17.871238 20.187428-17.871238s20.163048 5.778286 20.163048 17.871238v49.90781z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M427.422476 650.825143c-25.624381 0-34.06019 12.092952-34.06019 28.623238v52.906667c0 16.554667 8.43581 28.598857 34.06019 28.598857 25.624381 0 34.06019-12.04419 34.060191-28.598857v-52.906667c0-16.530286-8.46019-28.623238-34.060191-28.623238z m20.163048 80.018286c0 12.092952-4.949333 17.846857-20.163048 17.846857s-20.187429-5.753905-20.187428-17.846857v-49.90781c0-12.092952 4.973714-17.871238 20.187428-17.871238s20.163048 5.778286 20.163048 17.871238v49.90781z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M485.692952 666.86781c0.121905 0.853333 0.877714 1.243429 2.194286 1.243428 0.975238 0 5.729524-2.023619 8.43581-3.388952l1.536-0.75581v92.550095c0 3.85219 1.26781 4.437333 5.583238 4.437334h4.388571c2.876952 0 3.949714-1.219048 3.949714-4.437334v-101.473523c0-1.584762-0.512-4.217905-3.949714-4.217905-5.997714 0-15.36 4.266667-19.870476 6.290286-2.389333 1.048381-3.267048 1.974857-3.267048 3.437714 0 1.536 0.341333 3.218286 0.682667 4.851809l0.316952 1.462858z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M485.692952 666.86781c0.121905 0.853333 0.877714 1.243429 2.194286 1.243428 0.975238 0 5.729524-2.023619 8.43581-3.388952l1.536-0.75581v92.550095c0 3.85219 1.26781 4.437333 5.583238 4.437334h4.388571c2.876952 0 3.949714-1.219048 3.949714-4.437334v-101.473523c0-1.584762-0.512-4.217905-3.949714-4.217905-5.997714 0-15.36 4.266667-19.870476 6.290286-2.389333 1.048381-3.267048 1.974857-3.267048 3.437714 0 1.536 0.341333 3.218286 0.682667 4.851809l0.316952 1.462858z'
            }
          ),
          h(
            'path',
            {
              fill: '#EFF9FE',
              d: 'M573.464381 650.825143c-25.624381 0-34.06019 12.092952-34.060191 28.623238v52.906667c0 16.554667 8.43581 28.598857 34.060191 28.598857s34.06019-12.04419 34.06019-28.598857v-52.906667c0-16.530286-8.43581-28.623238-34.06019-28.623238z m20.138667 80.018286c0 12.092952-4.949333 17.846857-20.163048 17.846857-15.213714 0-20.163048-5.753905-20.163048-17.846857v-49.90781c0-12.092952 4.949333-17.871238 20.163048-17.871238 15.213714 0 20.163048 5.778286 20.163048 17.871238v49.90781z'
            }
          ),
          h(
            'path',
            {
              fill: '#3D6480',
              d: 'M573.464381 650.825143c-25.624381 0-34.06019 12.092952-34.060191 28.623238v52.906667c0 16.554667 8.43581 28.598857 34.060191 28.598857s34.06019-12.04419 34.06019-28.598857v-52.906667c0-16.530286-8.43581-28.623238-34.06019-28.623238z m20.138667 80.018286c0 12.092952-4.949333 17.846857-20.163048 17.846857-15.213714 0-20.163048-5.753905-20.163048-17.846857v-49.90781c0-12.092952 4.949333-17.871238 20.163048-17.871238 15.213714 0 20.163048 5.778286 20.163048 17.871238v49.90781z'
            }
          )
        )
      }

      getLabelShape() {
        return h(
          'text',
          {
            fill: '#000000',
            fontSize: 12,
            x: NodeSize / 2,
            y: NodeSize + 20,
            textAnchor: 'middle',
            dominantBaseline: 'middle'
          },
          '写日志'
        )
      }

      getShape() {
        const { x, y, width, height } = this.getAttributes()
        const transform = `matrix(1 0 0 1 ${x - width / 2} ${y - height / 2})`
        return h(
          'g',
          {
            transform
          },
          [
            h(
              'rect',
              {
                rx: 5,
                ry: 5,
                width: NodeSize,
                height: NodeSize,
                fill: '#fff',
                stroke: '#3D6380',
                strokeWidth: 1
              }
            ),
            this.getIconShape(),
            this.getLabelShape()
          ]
        )
      }
    }
    class Model extends PolygonNodeModel {
      constructor(data, graphModel) {
        super(data, graphModel)
        this.points = [
          [NodeSize / 2, 0],
          [NodeSize, NodeSize / 2],
          [NodeSize / 2, NodeSize],
          [0, NodeSize / 2]
        ]
      }
    }

    return {
      view: Node,
      model: Model
    }
  })
}
